home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / mail-tools / thor / thor_2.22 / thor.lha / rexx / CfgSOUP.thor < prev    next >
Text File  |  1995-12-18  |  1KB  |  44 lines

  1. /* $VER: CfgSOUP.thor 1.0 (12.12.1994)
  2.  *
  3.  * External configuration for the SOUP bbstype.
  4.  *
  5.  *  Script by: Kjell Irgens & Magne Østlyngen, Ultima Thule Software.
  6.  */
  7.  
  8. parse arg argument
  9. options results
  10.  
  11. template = 'BBSNAME,CONFNAME/K,PUBSCREEN/K'
  12.  
  13. p=address()||' '||show('P',,);if pos('THOR.',p)>0 then thorport=word(,
  14. substr(p,pos('THOR.',p)),1);else do;say 'No THOR port found!';exit 10;end
  15.  
  16. if ~show('p', 'BBSREAD') then do
  17.     address command
  18.         "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
  19.         "WaitForPort BBSREAD"
  20. end
  21.  
  22. address "BBSREAD"
  23.  
  24. READARGS template ARGS CMDLINE argument
  25. if rc ~= 0 then exit
  26.  
  27. GETBBSDATA bbsname '"'ARGS.BBSNAME'"' stem BBSDATA
  28. if rc ~= 0 then do
  29.     address(thorport)
  30.     REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
  31.     exit 5
  32. end
  33.  
  34. address(thorport)
  35.  
  36. REQUESTNOTIFY TEXT '"Edit or delete all header fields?"' BT '"_Edit|_Delete|_Cancel"'
  37.  
  38. if result = 1 then do
  39.     if ~exists(BBSDATA.BBSPATH||".header") then
  40.         REQUESTNOTIFY TEXT '"You may now edit extra header lines to appear\nin the editor when you write messages.\nFollowup-To: and Keywords: are good examples."' BT '"_Ok"'
  41.     STARTEDITOR FILE BBSDATA.BBSPATH||".header"
  42. end
  43. if result = 2 then address command "delete >NIL: "||BBSDATA.BBSPATH||".header"
  44.